<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/common/taglibs.jsp"%>
<script type="text/javascript">
function toUpdate(){
	var array = [];
	var url = "<c:url value='/team/user/update.do' />";
	sns.toUpdate(url, array, 'ck_members','tuid');
}
</script>
<div class="dirbar">
	<a style="vertical-align:middle" href="<c:url value='/home.do'/>">首页 </a> 
	&gt;&gt; <a href="<c:url value='/team/list.do'/>">群组</a> 
	&gt;&gt; <a href="<c:url value='/team/index.do?teamid=${teamid}'/>"><c:out value="${team.name}"/></a>
	&gt;&gt; 管理组员
</div>
<div class="bu">
<button onclick="toUpdate()">管理</button>
</div>
<div>
	<table id="t_team_user_list" width="100%"  border="0" cellpadding="0" cellspacing="0" class="pub_list01">
		<thead>
			<tr>
				<th width="50px" class="tdCenter">
				</th>
				<th width="75px" class="tdCenter">在此组昵称(社区昵称)</th>
				<th width="75px" class="tdCenter">职位</th>
				<th width="75px" class="tdCenter">状态</th>
				<th width="75px" class="tdCenter">加入时间</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="member" items="${members}" varStatus="status">
			<tr>
			<td class="tdCenter">
				<c:if test="${(teamUser.position == 1) || (teamUser.position == 2 && member.position == 3)}">
					<input type="checkbox" name="ck_members" id="ck_<c:out value='${member.tuid}' />" value="${member.tuid}"></input>
				</c:if>
			</td>
			<td class="tdCenter">
				<c:out value="${member.nickname}"></c:out>(<ms:user userid="${member.userid}" type="gnickname"></ms:user>)
			</td>
			<td class="tdCenter">
				<c:if test="${member.position == 1}"><font color="red">组长</font></c:if>
				<c:if test="${member.position == 2}"><font color="blue">副组长</font></c:if>
				<c:if test="${member.position == 3}">组员</c:if>
			</td>
			<td class="tdCenter">
				<c:if test="${member.status == 1}">正常</c:if>
				<c:if test="${member.status == 2}"><font color="red">申请</font></c:if>
				<c:if test="${member.status == 3}"><font color="blue">拒绝</font></c:if>
				<c:if test="${member.status == 4}"><font color="blue">邀请</font></c:if>
				<c:if test="${member.status == 9}"><font color="yellow">屏蔽</font></c:if>
			</td>
			<td class="tdCenter">
				<fmt:formatDate value="${member.createTime}" pattern="yyyy-MM-dd"/>
			</td>
			</tr>
			</c:forEach>
		</tbody>
	</table>
</div>